package com.dwj.auto.comment.controller;

import com.dwj.auto.comment.common.response.PageResponse;
import com.dwj.auto.comment.model.req.StuClassCriteria;
import com.dwj.auto.comment.model.req.StuClassSearchCriteria;
import com.dwj.auto.comment.model.vo.StuClassSearchVo;
import com.dwj.auto.comment.model.vo.StuClassVo;
import com.dwj.auto.comment.service.IStuClassService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName StuClassController
 * @Description 班级控制类
 * @Author dwjian
 * @Date 2020/1/20 0:26
 */
@RestController
@RequestMapping("/api/stu-class")
public class StuClassController {

    @Resource
    private IStuClassService stuClassService;

    @GetMapping("/get/list")
    public PageResponse<StuClassVo> getList(StuClassCriteria pagination){
        return stuClassService.getList(pagination);
    }

    @GetMapping("/search/list")
    public PageResponse<StuClassSearchVo> searchList(StuClassSearchCriteria pagination){
        return stuClassService.searchList(pagination);
    }
}
